package chainofresponsibility.chainms;

/**
 * @Author zhouyang.rosemary
 * @Description 投票者 成员变量中有自己对自己的引用
 * @Date 15:22 2019-07-23
 **/
public abstract class AbstractApprover {
    AbstractApprover successor;
    String name;
    AbstractApprover(String name){
        this.name = name;
    }

    /**
     * 处理请求
     * @param request 请求
     */
    public abstract void processRequest(PurchaseRequest request);
    public void setSuccessor(AbstractApprover successor){
        this.successor = successor;
    }
}
